package server.accessers.impl;

import server.accessers.DataWriterOperations;
import server.interfaces.Publisher;
import server.operations.Operation;

public class DataWriterImpl implements DataWriterOperations{
	private Publisher publisher;
	
	public DataWriterImpl(Publisher publisher) {
		this.publisher = publisher;
		((Thread)publisher).start();
	}
	
	@Override
	public boolean write(Operation operation) {
		return publisher.addData(operation);
	}
	
}
